import axios from 'axios';

let base = 'http://192.168.0.99:9094/api/v1';

/**
 * 公共接口
 */
export const getAppListReg = params => { return axios.post(`${base}getAppList`, params)};
/**
 * 登录
 */
export const requestLogin = params => { return axios.post(`${base}login`, params)};
export const userPermissionReg = params => { return axios.post(`${base}userPermission`, params)};//获取用户权限
// 忘记密码
export const forgetPaw = params => { return axios.post(`${base}updataPwd`, params)};
/**
 * 总结中心
 */
export const getDataDailyReg = params => { return axios.post(`${base}getDataDailyPara`, params)};//总结中心获取所有APP产品
export const getConclusionDataReg = params => { return axios.post(`${base}getConclusionData`, params)};//总结中心搜索信息
export const getBdCurveDataReg = params => { return axios.post(`${base}getBdCurveData`, params)};//总结中心BD折线图数据搜索
export const getMarketCurveDataReg = params => { return axios.post(`${base}getMarketCurveData`, params)};//总结中心市场折线图数据搜索
export const getCommentListReg = params => { return axios.post(`${base}getCommentList`, params)};//总结中心获取评论信息
export const addCommentReg = params => { return axios.post(`${base}addComment `, params)};//总结中心保存评论信息
export const dailyHistoryReg = params => { return axios.post(`${base}dailyHistory `, params)};//总结中心日报历史获取APP信息
export const getOperateAndSecondDataReg = params => { return axios.post(`${base}getOperateAndSecondData`, params)};//总结中心日报历史搜索运营续贷数据
export const getBdAndMarketDataReg = params => { return axios.post(`${base}getBdAndMarketData`, params)};//总结中心日报历史搜索BD市场数据
export const getBdAndMarketDeatailDataReg = params => { return axios.post(`${base}getBdAndMarketDeatailData`, params)};//总结中心日报历史搜索BD市场数据点击详情请求信息
export const getPerformanceParaReg = params => { return axios.post(`${base}getPerformancePara`, params)};//总结中心业绩查询获取搜索条件信息
export const getChannelsReg = params => { return axios.post(`${base}getChannels`, params)};//总结中心业绩查询改变渠道商获取渠道渠道号
export const getPerformanceReg = params => { return axios.post(`${base}getPerformance`, params)};//总结中心业绩查询接口
// 总结中心日报下载数据
export const exportOperateDataReg = params => { return axios({method: 'post',url: `${base}exportOperateData`,data: params,responseType: 'blob'})};//运营下载
export const exportSecondDataReg = params => { return axios({method: 'post',url: `${base}exportSecondData`,data: params,responseType: 'blob'})};//续贷下载
export const exportBdDataReg = params => { return axios({method: 'post',url: `${base}exportBdData`,data: params,responseType: 'blob'})};//BD下载
export const exportMarketDataReg = params => { return axios({method: 'post',url: `${base}exportMarketData`,data: params,responseType: 'blob'})};//市场下载
// 总结中心日报历史下载
export const exportOperateAndSecondDataReg = params => { return axios({method: 'post',url: `${base}exportOperateAndSecondData`,data: params,responseType: 'blob'})};//运营续贷下载
export const exportgetBdAndMarketDataReg = params => { return axios({method: 'post',url: `${base}exportgetBdAndMarketData`,data: params,responseType: 'blob'})};//BD市场下载
export const exportBdAndMarketDeatailDataReg = params => { return axios({method: 'post',url: `${base}exportBdAndMarketDeatailData`,data: params,responseType: 'blob'})};//BD市场详情下载
// 总结中心业绩查询下载数据
export const resultdownloadDataReg = params => { return axios({
	 method: 'post',
     url: `${base}exportPerformance`, // 请求地址
     data: params, // 参数
     responseType: 'blob' // 表明返回服务器返回的数据类型
})};
/**
 * 渠道中心
 */
export const getProxyNameListReg = params => { return axios.post(`${base}getProxyNameList`,params)}; // 渠道商下拉列表
export const getProxyInfoListReg = params => { return axios.post(`${base}getProxy`,params)}; // 获取渠道商列表信息
export const getChannelPermissionReg = params => { return axios.post(`${base}getChannelPermission`,params)}; // 获取账户权限
export const getChannelParasReg = params => { return axios.post(`${base}getChannelParameter`,params)}; // 获取渠道查询条件列表
export const getChannelListReg = params => { return axios.post(`${base}getChannel`,params)}; // 获取渠道列表
export const getEditChannelSelectListReg = params => { return axios.post(`${base}getChannelValue`,params)}; // 获取编辑渠道时下拉选择列表数据
export const getRewardListReg = params => { return axios.post(`${base}getReward`,params)}; // 获取渠道的阶梯分成方式
export const getRewardMainReg = params => { return axios.post(`${base}getRewardMain`,params)}; // 获取一级渠道的分成信息
export const getOptimizationInfoReg = params => { return axios.post(`${base}getOptimization`,params)}; // 获取渠道优化信息
export const saveOptimizationInfoReg = params => { return axios.post(`${base}addOptimization`,params)}; // 保存渠道优化信息
export const getfcHistoryReg = params => { return axios.post(`${base}getReward`,params)}; // 获取渠道分成历史记录
export const toggleChannelStatusReg = params => { return axios.post(`${base}setChannelAttribute`,params)}; // 切换渠道状态
export const getPayCompanyReg = params => { return axios.post(`${base}getPayCompany`,params) }; // 获取付款公司列表
export const updateAllStatusReg = params => { return axios.post(`${base}updateAllStatus`,params) }; // 一键禁用所有渠道
export const getChannelHistoryReg = params => { return axios.post(`${base}getChannelHistory`,params) }; // 获取渠道历史状态

/**
 * 报表中心
 */
 // 数据详情
export const getChannelParameterReg = params => { return axios.post(`${base}getChannelParameter`,params)}; //获取渠道查询条件列表
export const getChannelAttribute = params => { return axios.post(`${base}getChannelAttribute`,params)};// 渠道分配
export const getReportform = params => { return axios.post(`${base}getReportform`,params)}; // 渠道中心查询接口
// 下载数据详情
export const downloadDataReg = params => { return axios({
	 method: 'post',
     url: `${base}exportData`, // 请求地址
     data: params, // 参数
     responseType: 'blob' // 表明返回服务器返回的数据类型
})};
// 流程转化表
export const getReportformAPPReg = params => { return axios.post(`${base}getReportformAPP`,params)}; // 流程转化表查询数据接口
// 下载流程转化表
export const downexportDataAppReg = params => { return axios({
	 method: 'post',
     url: `${base}exportDataApp`, // 请求地址
     data: params, // 参数
     responseType: 'blob' // 表明返回服务器返回的数据类型
})};
/* 
报表配置
*/
export const getTableColumnsReg = params => { return axios.post(`${base}getTableColumns`,params)};//首次进入获取的数据
export const updateTableColumnsReg = params => { return axios.post(`${base}updateTableColumns`,params)};//保存配置
// 用户行为-数据埋点
// 整体转化
export const getTotalInfoReg = params => { return axios.post(`${base}micro/summary`,params)};
// 注册申请留存
export const applyRetentionReg = params => { return axios.post(`${base}micro/applyRetention`,params)};
// 开户分布
export const openDistributionReg = params => { return axios.post(`${base}micro/openDistribution`,params)};
// 申请开户留存
export const openRetentionReg = params => { return axios.post(`${base}micro/openRetention`,params)};
// 提现留存
export const loanDistributionReg = params => { return axios.post(`${base}micro/loanDistribution`,params)};
// 开户-提现留存
export const loanRetentionReg = params => { return axios.post(`${base}micro/loanRetention`,params)};
// 开户-分析
export const actionRetentionReg = params => { return axios.post(`${base}micro/actionRetention`,params)};
// 时长分析
export const actionYamTimeReg = params => { return axios.post(`${base}micro/actionYamTime`,params)};//验证码接口
export const actionPageTimeReg = params => { return axios.post(`${base}micro/actionPageTime`,params)};//页面停留接口
export const actionErrorPageReg = params => { return axios.post(`${base}micro/actionErrorPage`,params)};//返回分析接口
export const actionErrorPageSearchReg = params => { return axios.post(`${base}micro/actionErrorPageSearch`,params)};//返回分析接口搜索条件
export const exportErrorPageReg = params => { return axios({method: 'post',url: `${base}micro/exportErrorPage`,data: params,responseType:'blob'})};//返回分析下载
export const actionUserParamReg = params => { return axios.post(`${base}micro/actionUserParam`,params)};//用户分析获取搜索条件
export const actionUserReg = params => { return axios.post(`${base}micro/actionUser`,params)};//用户分析搜索信息
export const exportUserActionReg = params => { return axios({method: 'post',url: `${base}micro/exportUserAction`,data: params,responseType:'blob'})};//下载报表用户分析
/**
 * 数据中心
 */
 // 数据重跑
 // 获取搜索条件内容
 export const dataSeachAddInfo = params => { return axios.post(`${base}getOptimizationTaskParameter`,params)};
 export const getReportTypeReg = params => { return axios.post(`${base}getTableType`,params)};
 export const getRedoHistoryListReg = params => { return axios.post(`${base}getOptimizationTask`,params)};
 export const uploadCostRecordReg = params => { return axios.post(`${base}addCost`,params)}; // 上传成本记录
 export const getCostRecordReg = params => { return axios.post(`${base}getCost`,params)}; // 获取上传成本记录
 export const deleteCostRecordReg = params => { return axios.post(`${base}deleteCost`,params)}; // 删除记录
 export const addOptimizationTaskReg = params => { return axios.post(`${base}addOptimizationTask`,params)}; // 添加信息
 export const getOptimizationTaskReg = params => { return axios.post(`${base}getOptimizationTask`,params)}; // 搜索接口
 export const startOptimizationTaskReg = params => { return axios.post(`${base}startOptimizationTask`,params)}; // 一键重跑
 export const deleteOptimizationTaskReg = params => { return axios.post(`${base}deleteOptimizationTask`,params)}; // 删除数据
 export const getRunOptimizationTaskReg = params => { return axios.post(`${base}getRunOptimizationTask`,params)}; // 正在跑的数据
 export const partnerManagerallselectReg = params => { return axios.post(`${base}partnerManager`,params)};//运营成本数据管理获取搜索信息接口
 export const getOperateCostingReg = params => { return axios.post(`${base}getOperateCosting`,params)};//运营成本数���管理搜索接口
 export const addOrUpdateCostingReg = params => { return axios.post(`${base}addOrUpdateCosting`,params)};//运营成本数据新增接口
 export const deleteCostingReg = params => { return axios.post(`${base}deleteCosting`,params)};//运营成本数据新增接口
 export const updateCostingReg = params => { return axios.post(`${base}updateCosting`,params)};//运营成本数据同步接口
 /**
 * 用户中心
 */
export const getAdminList = params => { return axios.post(`${base}getAdmin`,params)};
export const adduser = params => { return axios.post(`${base}addAdmin`,params)};
export const addAdmin = params => { return axios.post(`${base}addAdmin`,params)};
export const AdminParameter = params => { return axios.post(`${base}AdminParameter`,params)};
export const getAdminPermissionReg = params => { return axios.post(`${base}getAdminPermission`,params)};//获取用户权限信息列表
export const addAdminPermissionReg = params => { return axios.post(`${base}addAdminPermission`,params)};//保存用户权限信息列表
/**
 * 系统中心
 */
export const getPermissionTypeReg = params => { return axios.post(`${base}getPermissionType`,params)};//获取所有的功能组列表
export const addPermissionTypeReg = params => { return axios.post(`${base}addPermissionType`,params)};//增加功能组
export const checkPermissionTypeReg = params => { return axios.post(`${base}checkPermissionType`,params)};//增加功能组时验证名字是否重复
export const addPermissionReg = params => { return axios.post(`${base}addPermission`,params)};//增加保存功能
export const checkPermissionReg = params => { return axios.post(`${base}checkPermission`,params)};//功能名称是否重复
export const checkMetaReg = params => { return axios.post(`${base}checkMeta`,params)};//功能meta是否重复
export const getPermissionReg = params => { return axios.post(`${base}getPermission`,params)};//点击管理获取相应的列表信息
export const updatePermissionReg = params => { return axios.post(`${base}updatePermission`,params)};//保存修改管理下列表的信息
/**
 * 运营中心
 */
export const partnerManagerReg = params => { return axios.post(`${base}partnerManager`,params)};//获取搜索信息
export const getOurCompanyReg = params => { return axios.post(`${base}getOurCompany`,params)};//获取我方公司详细信息接口
export const addOrUpdatePartnerReg = params => { return axios.post(`${base}addOrUpdatePartner`,params)};//添加和修改接口 
export const deletePartnerReg = params => { return axios.post(`${base}deletePartner`,params)};//添加和修改接口 
/**
 * 财务中心
 */
// 渠道商账单
export const getBillParameterReg = params => { return axios.post(`${base}getBillParameter`,params)};//获取渠道商账单参数
export const getBillReg = params => { return axios.post(`${base}getBill`,params)};//获取渠道商列表
export const getBillDetailReg = params => { return axios.post(`${base}getBillDetails`,params)};//获取渠道商列表
export const updateBillStatusReg = params => { return axios.post(`${base}updateBillStatus`,params)};//审批接口
export const updateBillReg = params => { return axios.post(`${base}updateBill`,params)};//刷新账单
export const batchUpdateBillReg = params => { return axios.post(`${base}batchUpdateBill`,params)};//批量审批账单
// 合作方账单
export const getPartnerBillParaReg = params => { return axios.post(`${base}getPartnerBillPara`,params)};//获取合作方账单参数
export const getPartnerBillReg = params => { return axios.post(`${base}getPartnerBill`,params)};//获取合作方账单列表
export const exportPartnerBillReg = params => { return axios.post(`${base}exportPartnerBillData`,params)};//下载合作方账单
export const updatePartnerBillReg = params => { return axios.post(`${base}updatePartnerBill`,params)};//下载合作方账单
// 财务同步
export const FinanceTaskReg = params => { return axios.post(`${base}FinanceTask`,params)};//财务同步

